{% extends 'base.html' %}

{% block title %}编辑作物品种{% endblock %}

{% block content %}
<div class="card">
    <div class="card-header bg-primary text-white">
        <h4 class="mb-0">编辑作物品种</h4>
    </div>
    <div class="card-body">
        <form method="post">
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label for="name" class="form-label">品种名称</label>
                    <input type="text" class="form-control" id="name" name="name" value="{{ data.name }}" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label for="crop_type" class="form-label">作物类型</label>
                    <input type="text" class="form-control" id="crop_type" name="crop_type" value="{{ data.crop_type }}" required>
                </div>
                <div class="col-md-12 mb-3">
                    <label for="characteristics" class="form-label">品种特性</label>
                    <textarea class="form-control" id="characteristics" name="characteristics" rows="3">{{ data.characteristics }}</textarea>
                </div>
                <div class="col-md-6 mb-3">
                    <label for="yield_potential" class="form-label">产量潜力</label>
                    <input type="text" class="form-control" id="yield_potential" name="yield_potential" value="{{ data.yield_potential }}">
                </div>
                <div class="col-md-6 mb-3">
                    <label for="market_value" class="form-label">市场价值</label>
                    <input type="text" class="form-control" id="market_value" name="market_value" value="{{ data.market_value }}">
                </div>
            </div>
            <div class="mt-3">
                <button type="submit" class="btn btn-primary">保存更改</button>
                <a href="{{ url_for('data.crop_list') }}" class="btn btn-secondary">返回</a>
            </div>
        </form>
    </div>
</div>
{% endblock %} 